<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>



<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="/designinclass/css/formain.css" rel="stylesheet"
	type="text/css" />
<script src="/designinclass/js/formain.js" type="text/javascript">
	
</script>
<script type="text/javascript">
	function acc() {
		var a;
		a = "${temp}";
		if (a > 0) {
			alert("发帖失败，请先登录");
		}
	}
</script>

</head>
<body onload="acc()">

	<div id="index">

		<div id="top">
			<div>
				<form method="post" action="/designinclass/IniServlet">
					<input type="text" name="engine" /> <input type="submit" value="搜索" />

				</form>
			</div>
			<ul>

				<li onclick="log()"><c:if test="${empty username}" var="young"
						scope="session">登录</c:if></li>
				<li><c:if test="${!empty username}" var="young1"
						scope="session">欢迎您:${username}</c:if></li>
				<li><a href="/designinclass/pages/album.jsp">相册</a></li>
				<li><a href="/designinclass/pages/register.jsp">注册</a></li>
			</ul>
		</div>
		<div id="middle">
			<div id="left"></div>
			<div id="center">
				<c:set var="count" value="1" scope="request"></c:set>
				<c:forEach items="${titles }" var="t">



					<c:if test="${count%2>0}">
						<div class="building">
							<a	href="/designinclass/CommentServlet?buildingid=${t.buildingID}">${t.owner}========${t.title}</a>
						</div>
					</c:if>

					<c:if test="${count%2<1}">
						<div class="buildings">
							<a
								href="/designinclass/CommentServlet?buildingid=${t.buildingID}">${t.owner}========${t.title}</a>
						</div>
					</c:if>
					<c:set var="count" value="${count+1}"></c:set>



				</c:forEach>
				<div>
					<form method="post" action="/designinclass/BuildServlet">
						<div>
							主题：<input type="text" name="title" />
						</div>
						<div>
							内容：
							<textarea name="content"></textarea>
						</div>
						<div>
							<input type="submit" value="发表" />
						</div>

					</form>
				</div>

			</div>
			<div id="right"></div>


		</div>
		<div id="bottom"></div>
	</div>

	<div id="dialogue" style="position: absolute; left: 500px; top: 160px"
		onmousedown="$(this,event)">
		<form action="/designinclass/LogServlet" method="post">
			<h1>
				<font color="blue">登录</font>
			</h1>
			<br>
			<hr />
			<div>
				<div class="hint">用户名</div>
				<div>
					<input type="text" name="username" />
				</div>
				<br>
				<div class="hint">密码</div>
				<div>
					<input type="password" name="password" />
				</div>
				<br>

				<div class="hint">验证码</div>
				<div>
					<input type="text" name="checkcode" />
				</div>
				<br>

				<div class="hint">
					<input type="hidden" />
				</div>
				<br>

				<div>
					<input type="submit" value="确定" />
				</div>
				<div>
					<a href="/designinclass/IniServlet"><input type="button"
						value="取消" /></a>
				</div>


			</div>

		</form>


	</div>

	<div id="light"></div>



</body>
</html>